<?php
namespace Common\Model;
use Common\Common\Object;

/**
 * Class ConsumerObject
 * @package Common\Model
 *
 * @property int $ID
 * @property string $Username
 * @property string $Password
 *
 */
class ConsumerObject extends Object{

    /**
     * 获取我的购物车
     * @return array
     */
    public function fetchShoppingcart(){
        $shoppingcart = D('Shoppingcart');
        return $shoppingcart->fetchList(['ConsumerID' => $this->ID]);
    }
    public function fetchOrder(){
        $Order = D('Order');
        return $Order->fetchList(['ConsumerID' => $this->ID]);
    }
}